import { defineStore } from "pinia";
import { ref } from "vue";

//队员模块
export const useAdminStore = defineStore('userInfoStore',() => {
    const admin = ref()
    const setAdmin = (newAdmin) => {
        admin.value = newAdmin
    }
    const getAdmin = () => {
        return admin.value
    }
    const removeAdmin= () => {
        admin.value = ''
    }

    return {
        admin,
        getAdmin,
        setAdmin,
        removeAdmin
    }
},
{
    persist: true
}
)